#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fp_neg()
{
    sm2_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0xe6,0x87,0xe5,0xec,0x83,0x35,0x49,0x60,0x8e,0x05,0x6b,0x24,0x66,0x61,0x8a,0xf8,0xee,0x25,0x77,0xc5,0x6f,0x1d,0x20,0x42,0x92,0x52,0x38,0x24,0xaa,0xcd,0xe3,0xaf};
    static std::uint8_t c0[32] = {0x19,0x78,0x1a,0x12,0x7c,0xca,0xb6,0x9f,0x71,0xfa,0x94,0xdb,0x99,0x9e,0x75,0x07,0x11,0xda,0x88,0x39,0x90,0xe2,0xdf,0xbe,0x6d,0xad,0xc7,0xdb,0x55,0x32,0x1c,0x50};
    sm2_fp_from_bytes(a, a0);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a1[32] = {0xb8,0x69,0x26,0x03,0x03,0x55,0x46,0xd1,0xbb,0xe6,0x4e,0xb3,0x4f,0x13,0x6d,0xdc,0x21,0xb2,0xf7,0xd8,0x19,0x77,0x5f,0x66,0xa4,0xdf,0x12,0x69,0xb1,0x9f,0x49,0xfe};
    static std::uint8_t c1[32] = {0x47,0x96,0xd9,0xfb,0xfc,0xaa,0xb9,0x2e,0x44,0x19,0xb1,0x4c,0xb0,0xec,0x92,0x23,0xde,0x4d,0x08,0x26,0xe6,0x88,0xa0,0x9a,0x5b,0x20,0xed,0x96,0x4e,0x60,0xb6,0x01};
    sm2_fp_from_bytes(a, a1);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a2[32] = {0x93,0x92,0xd3,0x4b,0xb2,0x89,0xa1,0x5c,0x7a,0x9d,0xd9,0x10,0xa0,0x7c,0xf9,0x44,0x0e,0x71,0x60,0x30,0x01,0x7a,0xf4,0xe9,0xbc,0xed,0x19,0x66,0x59,0xe5,0xad,0x4f};
    static std::uint8_t c2[32] = {0x6c,0x6d,0x2c,0xb3,0x4d,0x76,0x5e,0xa3,0x85,0x62,0x26,0xef,0x5f,0x83,0x06,0xbb,0xf1,0x8e,0x9f,0xce,0xfe,0x85,0x0b,0x17,0x43,0x12,0xe6,0x99,0xa6,0x1a,0x52,0xb0};
    sm2_fp_from_bytes(a, a2);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a3[32] = {0x59,0x63,0xd1,0xcd,0x00,0x57,0x7d,0xc5,0x2c,0xe3,0x75,0x3d,0xef,0x91,0x87,0x87,0xea,0x83,0x03,0xbc,0x9f,0xf2,0x8e,0xc6,0x92,0xf3,0xaf,0x40,0x5e,0xbe,0xcc,0x4d};
    static std::uint8_t c3[32] = {0xa6,0x9c,0x2e,0x31,0xff,0xa8,0x82,0x3a,0xd3,0x1c,0x8a,0xc2,0x10,0x6e,0x78,0x78,0x15,0x7c,0xfc,0x42,0x60,0x0d,0x71,0x3a,0x6d,0x0c,0x50,0xbf,0xa1,0x41,0x33,0xb2};
    sm2_fp_from_bytes(a, a3);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a4[32] = {0x78,0x3d,0xc3,0xd3,0x3d,0x2f,0x06,0x65,0xb8,0x89,0xbf,0x13,0x73,0xf0,0x5b,0x2b,0x7b,0xc1,0x58,0x29,0x62,0x31,0x3e,0x03,0x74,0xed,0x93,0x1e,0x50,0xd5,0x34,0x7e};
    static std::uint8_t c4[32] = {0x87,0xc2,0x3c,0x2b,0xc2,0xd0,0xf9,0x9a,0x47,0x76,0x40,0xec,0x8c,0x0f,0xa4,0xd4,0x84,0x3e,0xa7,0xd5,0x9d,0xce,0xc1,0xfd,0x8b,0x12,0x6c,0xe1,0xaf,0x2a,0xcb,0x81};
    sm2_fp_from_bytes(a, a4);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a5[32] = {0xa7,0x35,0x4f,0x2b,0x6b,0xe6,0xb4,0x00,0xe5,0x51,0x13,0x5b,0x94,0xe1,0x7c,0x3d,0xd1,0xd2,0xe8,0xf4,0xda,0xbf,0x5b,0x44,0xc5,0xa0,0xce,0xc2,0xee,0x45,0x54,0x2c};
    static std::uint8_t c5[32] = {0x58,0xca,0xb0,0xd3,0x94,0x19,0x4b,0xff,0x1a,0xae,0xec,0xa4,0x6b,0x1e,0x83,0xc2,0x2e,0x2d,0x17,0x0a,0x25,0x40,0xa4,0xbc,0x3a,0x5f,0x31,0x3d,0x11,0xba,0xab,0xd3};
    sm2_fp_from_bytes(a, a5);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a6[32] = {0x87,0xde,0x94,0x76,0x4d,0xc4,0x0b,0xa4,0x6d,0x12,0x71,0x63,0x30,0x0c,0x0b,0xba,0x59,0xdb,0xae,0xe4,0x73,0xae,0x93,0x8d,0x35,0x14,0x3d,0xbe,0xd5,0x49,0x21,0x44};
    static std::uint8_t c6[32] = {0x78,0x21,0x6b,0x88,0xb2,0x3b,0xf4,0x5b,0x92,0xed,0x8e,0x9c,0xcf,0xf3,0xf4,0x45,0xa6,0x24,0x51,0x1a,0x8c,0x51,0x6c,0x73,0xca,0xeb,0xc2,0x41,0x2a,0xb6,0xde,0xbb};
    sm2_fp_from_bytes(a, a6);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a7[32] = {0x5b,0x28,0xf1,0x4b,0xe2,0xef,0x94,0x3b,0x8d,0x5f,0xd0,0x0f,0xa7,0x7a,0x2d,0xc3,0x4e,0x6e,0x28,0x76,0x4a,0x9d,0x6c,0x6f,0x6a,0xfe,0x27,0x60,0x78,0x9f,0x79,0x54};
    static std::uint8_t c7[32] = {0xa4,0xd7,0x0e,0xb3,0x1d,0x10,0x6b,0xc4,0x72,0xa0,0x2f,0xf0,0x58,0x85,0xd2,0x3c,0xb1,0x91,0xd7,0x88,0xb5,0x62,0x93,0x91,0x95,0x01,0xd8,0x9f,0x87,0x60,0x86,0xab};
    sm2_fp_from_bytes(a, a7);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a8[32] = {0x17,0x62,0x6a,0x20,0x12,0x6c,0xbf,0xe3,0xd4,0xd3,0x34,0x9e,0xa3,0x00,0x79,0x97,0x5c,0x53,0x0c,0xe2,0x96,0x6f,0x06,0x0d,0x3d,0x4c,0xe0,0x6b,0x4d,0xe7,0x85,0x79};
    static std::uint8_t c8[32] = {0xe8,0x9d,0x95,0xde,0xed,0x93,0x40,0x1c,0x2b,0x2c,0xcb,0x61,0x5c,0xff,0x86,0x68,0xa3,0xac,0xf3,0x1c,0x69,0x90,0xf9,0xf3,0xc2,0xb3,0x1f,0x94,0xb2,0x18,0x7a,0x86};
    sm2_fp_from_bytes(a, a8);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a9[32] = {0x26,0xf8,0xf9,0x20,0xc2,0xbd,0x3b,0x0d,0x07,0xa9,0x47,0x83,0xc6,0xd5,0xc1,0x9d,0x04,0x00,0xbd,0xaa,0x22,0xda,0x36,0x29,0xb8,0x43,0xb2,0xa3,0x67,0x7c,0x6f,0x4c};
    static std::uint8_t c9[32] = {0xd9,0x07,0x06,0xde,0x3d,0x42,0xc4,0xf2,0xf8,0x56,0xb8,0x7c,0x39,0x2a,0x3e,0x62,0xfb,0xff,0x42,0x54,0xdd,0x25,0xc9,0xd7,0x47,0xbc,0x4d,0x5c,0x98,0x83,0x90,0xb3};
    sm2_fp_from_bytes(a, a9);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a10[32] = {0x7e,0xa4,0x00,0x99,0x12,0x00,0x4f,0x82,0xd9,0xcc,0x03,0xbf,0x26,0x63,0xe0,0xd4,0x18,0x76,0xc0,0xbc,0x4d,0x1b,0x1d,0xd9,0x43,0x2a,0xd0,0x72,0x9d,0x66,0x4d,0x0f};
    static std::uint8_t c10[32] = {0x81,0x5b,0xff,0x65,0xed,0xff,0xb0,0x7d,0x26,0x33,0xfc,0x40,0xd9,0x9c,0x1f,0x2b,0xe7,0x89,0x3f,0x42,0xb2,0xe4,0xe2,0x27,0xbc,0xd5,0x2f,0x8d,0x62,0x99,0xb2,0xf0};
    sm2_fp_from_bytes(a, a10);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a11[32] = {0x30,0xc7,0x9c,0x4c,0x98,0x45,0xc1,0x06,0xbb,0x62,0x06,0xe7,0xdb,0xb6,0xa9,0x82,0x3d,0x1a,0xc8,0x74,0x4c,0x9b,0x0f,0xa9,0x61,0x18,0xf9,0x6d,0xdf,0x1a,0x10,0xa9};
    static std::uint8_t c11[32] = {0xcf,0x38,0x63,0xb2,0x67,0xba,0x3e,0xf9,0x44,0x9d,0xf9,0x18,0x24,0x49,0x56,0x7d,0xc2,0xe5,0x37,0x8a,0xb3,0x64,0xf0,0x57,0x9e,0xe7,0x06,0x92,0x20,0xe5,0xef,0x56};
    sm2_fp_from_bytes(a, a11);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a12[32] = {0xa2,0x06,0x30,0x8f,0x5c,0xfa,0x9e,0xa4,0x8a,0xd8,0xcb,0x5f,0x02,0xdc,0xd5,0xe4,0xc4,0xac,0x17,0xbf,0x7c,0x99,0xba,0x38,0x9b,0x4f,0x4f,0x55,0x56,0x4d,0x86,0xab};
    static std::uint8_t c12[32] = {0x5d,0xf9,0xcf,0x6f,0xa3,0x05,0x61,0x5b,0x75,0x27,0x34,0xa0,0xfd,0x23,0x2a,0x1b,0x3b,0x53,0xe8,0x3f,0x83,0x66,0x45,0xc8,0x64,0xb0,0xb0,0xaa,0xa9,0xb2,0x79,0x54};
    sm2_fp_from_bytes(a, a12);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a13[32] = {0x09,0xba,0x0c,0xa3,0x89,0x30,0x61,0x8c,0xe1,0x12,0xa2,0x1e,0x0b,0x37,0xdd,0xcf,0xeb,0x3c,0xfa,0x86,0x8f,0x23,0xda,0xf3,0xe4,0x73,0x70,0xdc,0x73,0x37,0x1d,0x21};
    static std::uint8_t c13[32] = {0xf6,0x45,0xf3,0x5b,0x76,0xcf,0x9e,0x73,0x1e,0xed,0x5d,0xe1,0xf4,0xc8,0x22,0x30,0x14,0xc3,0x05,0x78,0x70,0xdc,0x25,0x0d,0x1b,0x8c,0x8f,0x23,0x8c,0xc8,0xe2,0xde};
    sm2_fp_from_bytes(a, a13);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a14[32] = {0x9a,0xa1,0x74,0x8d,0x6f,0x33,0x47,0x77,0x5f,0x74,0x79,0xc9,0xe6,0x1d,0x92,0x31,0x44,0x97,0x50,0x51,0x6f,0x93,0x19,0x7a,0x39,0xb5,0xa4,0x10,0xf1,0xc5,0x7c,0xb4};
    static std::uint8_t c14[32] = {0x65,0x5e,0x8b,0x71,0x90,0xcc,0xb8,0x88,0xa0,0x8b,0x86,0x36,0x19,0xe2,0x6d,0xce,0xbb,0x68,0xaf,0xad,0x90,0x6c,0xe6,0x86,0xc6,0x4a,0x5b,0xef,0x0e,0x3a,0x83,0x4b};
    sm2_fp_from_bytes(a, a14);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a15[32] = {0x43,0x31,0x3d,0x9a,0x42,0x06,0x59,0xfe,0xaf,0x05,0x5b,0x3c,0xcf,0xfc,0xaf,0x03,0x52,0x04,0x92,0xcf,0x47,0x4d,0x07,0x66,0x9e,0xc3,0x3d,0x50,0x35,0x03,0x33,0xbd};
    static std::uint8_t c15[32] = {0xbc,0xce,0xc2,0x64,0xbd,0xf9,0xa6,0x01,0x50,0xfa,0xa4,0xc3,0x30,0x03,0x50,0xfc,0xad,0xfb,0x6d,0x2f,0xb8,0xb2,0xf8,0x9a,0x61,0x3c,0xc2,0xaf,0xca,0xfc,0xcc,0x42};
    sm2_fp_from_bytes(a, a15);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a16[32] = {0x84,0xbc,0x7e,0x98,0xa2,0xcd,0x40,0xe1,0xfd,0x3f,0x6d,0xec,0xf7,0x32,0x65,0x4c,0xd9,0x89,0xd3,0x8e,0x9e,0x16,0xdf,0xa7,0xea,0xd7,0x94,0xfc,0x8f,0x0c,0xe3,0xa8};
    static std::uint8_t c16[32] = {0x7b,0x43,0x81,0x66,0x5d,0x32,0xbf,0x1e,0x02,0xc0,0x92,0x13,0x08,0xcd,0x9a,0xb3,0x26,0x76,0x2c,0x70,0x61,0xe9,0x20,0x59,0x15,0x28,0x6b,0x03,0x70,0xf3,0x1c,0x57};
    sm2_fp_from_bytes(a, a16);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a17[32] = {0x1e,0x5b,0x24,0x92,0x97,0x45,0x02,0xc1,0x33,0xb2,0x87,0xe9,0x1e,0x58,0xd4,0x8d,0x12,0x43,0x41,0xb0,0x17,0xda,0x17,0x58,0xf5,0x50,0xf8,0x2a,0x32,0xaa,0x61,0xa8};
    static std::uint8_t c17[32] = {0xe1,0xa4,0xdb,0x6c,0x68,0xba,0xfd,0x3e,0xcc,0x4d,0x78,0x16,0xe1,0xa7,0x2b,0x72,0xed,0xbc,0xbe,0x4e,0xe8,0x25,0xe8,0xa8,0x0a,0xaf,0x07,0xd5,0xcd,0x55,0x9e,0x57};
    sm2_fp_from_bytes(a, a17);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a18[32] = {0x16,0xa1,0x53,0x79,0xb3,0x34,0x5c,0x97,0x68,0x61,0x1e,0xf8,0x31,0x37,0xa7,0x5e,0xe1,0x50,0x81,0xdd,0x66,0xba,0xc0,0x57,0x62,0xd8,0x22,0x9c,0xe2,0x0b,0xa8,0x44};
    static std::uint8_t c18[32] = {0xe9,0x5e,0xac,0x85,0x4c,0xcb,0xa3,0x68,0x97,0x9e,0xe1,0x07,0xce,0xc8,0x58,0xa1,0x1e,0xaf,0x7e,0x21,0x99,0x45,0x3f,0xa9,0x9d,0x27,0xdd,0x63,0x1d,0xf4,0x57,0xbb};
    sm2_fp_from_bytes(a, a18);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a19[32] = {0xc8,0xe7,0xf6,0xf2,0x00,0xde,0x99,0xe9,0xad,0x7b,0x20,0xb0,0x1e,0x01,0x01,0x2d,0x1a,0x2b,0xc7,0x17,0x5a,0x4a,0xdd,0x2a,0x8c,0x67,0x27,0x37,0x5f,0xc4,0x10,0xeb};
    static std::uint8_t c19[32] = {0x37,0x18,0x09,0x0c,0xff,0x21,0x66,0x16,0x52,0x84,0xdf,0x4f,0xe1,0xfe,0xfe,0xd2,0xe5,0xd4,0x38,0xe7,0xa5,0xb5,0x22,0xd6,0x73,0x98,0xd8,0xc8,0xa0,0x3b,0xef,0x14};
    sm2_fp_from_bytes(a, a19);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a20[32] = {0x15,0x62,0xa0,0xd1,0x9b,0xd0,0x7e,0x7d,0x38,0x7e,0x8d,0xdc,0xb2,0xe8,0x76,0xbb,0x63,0xf2,0xfa,0xcc,0xfb,0xb9,0x11,0x63,0xf2,0x58,0xcd,0x51,0x36,0xa4,0x85,0x4f};
    static std::uint8_t c20[32] = {0xea,0x9d,0x5f,0x2d,0x64,0x2f,0x81,0x82,0xc7,0x81,0x72,0x23,0x4d,0x17,0x89,0x44,0x9c,0x0d,0x05,0x32,0x04,0x46,0xee,0x9d,0x0d,0xa7,0x32,0xae,0xc9,0x5b,0x7a,0xb0};
    sm2_fp_from_bytes(a, a20);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a21[32] = {0x36,0xf5,0xd5,0x0e,0xca,0x2d,0x8f,0xd0,0x82,0x10,0x04,0xbb,0xcc,0x55,0x8e,0x02,0xec,0xba,0x4b,0xab,0x6b,0x4c,0x54,0x10,0x8c,0xb4,0x6a,0x41,0xc1,0x6c,0x0b,0x82};
    static std::uint8_t c21[32] = {0xc9,0x0a,0x2a,0xf0,0x35,0xd2,0x70,0x2f,0x7d,0xef,0xfb,0x44,0x33,0xaa,0x71,0xfd,0x13,0x45,0xb4,0x53,0x94,0xb3,0xab,0xf0,0x73,0x4b,0x95,0xbe,0x3e,0x93,0xf4,0x7d};
    sm2_fp_from_bytes(a, a21);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a22[32] = {0x4a,0x45,0x9a,0x84,0xe8,0x21,0xc6,0x39,0x5c,0xcb,0x4a,0x4a,0xfe,0x4d,0x33,0xe3,0x0d,0x4d,0xba,0x4a,0x68,0xb2,0x31,0x98,0x5f,0xdd,0xa3,0xd4,0x8a,0xcf,0xe6,0xe1};
    static std::uint8_t c22[32] = {0xb5,0xba,0x65,0x7a,0x17,0xde,0x39,0xc6,0xa3,0x34,0xb5,0xb5,0x01,0xb2,0xcc,0x1c,0xf2,0xb2,0x45,0xb4,0x97,0x4d,0xce,0x68,0xa0,0x22,0x5c,0x2b,0x75,0x30,0x19,0x1e};
    sm2_fp_from_bytes(a, a22);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a23[32] = {0x27,0xc6,0xa9,0xac,0x3b,0x82,0xfb,0x2c,0xbd,0xb2,0x29,0x0c,0xc1,0x02,0x4d,0x50,0x4f,0x18,0xb5,0x3d,0x41,0x63,0x5c,0xa6,0x06,0x2a,0x98,0x55,0x3f,0x43,0xe8,0x0e};
    static std::uint8_t c23[32] = {0xd8,0x39,0x56,0x52,0xc4,0x7d,0x04,0xd3,0x42,0x4d,0xd6,0xf3,0x3e,0xfd,0xb2,0xaf,0xb0,0xe7,0x4a,0xc1,0xbe,0x9c,0xa3,0x5a,0xf9,0xd5,0x67,0xaa,0xc0,0xbc,0x17,0xf1};
    sm2_fp_from_bytes(a, a23);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a24[32] = {0xd7,0x9d,0x42,0xa1,0x03,0xc3,0xa1,0x92,0x59,0x5d,0x2f,0x90,0x08,0x3d,0x50,0x51,0x77,0x53,0x67,0x26,0x28,0xc8,0x08,0x17,0xff,0xed,0xe0,0xad,0x40,0x00,0xe3,0x10};
    static std::uint8_t c24[32] = {0x28,0x62,0xbd,0x5d,0xfc,0x3c,0x5e,0x6d,0xa6,0xa2,0xd0,0x6f,0xf7,0xc2,0xaf,0xae,0x88,0xac,0x98,0xd8,0xd7,0x37,0xf7,0xe9,0x00,0x12,0x1f,0x52,0xbf,0xff,0x1c,0xef};
    sm2_fp_from_bytes(a, a24);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a25[32] = {0x57,0xd4,0x61,0xc5,0x62,0x9c,0x6e,0x2c,0x96,0xdf,0xb2,0xd4,0x6c,0x31,0x32,0x1f,0x0c,0x27,0x8a,0x49,0xb8,0x21,0xaf,0x4f,0xf0,0xe8,0x54,0xc2,0x9f,0x4f,0x07,0xd2};
    static std::uint8_t c25[32] = {0xa8,0x2b,0x9e,0x39,0x9d,0x63,0x91,0xd3,0x69,0x20,0x4d,0x2b,0x93,0xce,0xcd,0xe0,0xf3,0xd8,0x75,0xb5,0x47,0xde,0x50,0xb1,0x0f,0x17,0xab,0x3d,0x60,0xb0,0xf8,0x2d};
    sm2_fp_from_bytes(a, a25);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a26[32] = {0xf3,0x07,0xf7,0xb0,0xa1,0xcf,0xc9,0x7d,0x0a,0xaa,0x1e,0x5d,0xeb,0x7a,0x97,0xad,0xd7,0xc3,0xca,0x83,0xaa,0xd4,0xa7,0x17,0xd6,0xdd,0x3f,0x21,0x13,0xd3,0x1d,0x41};
    static std::uint8_t c26[32] = {0x0c,0xf8,0x08,0x4e,0x5e,0x30,0x36,0x82,0xf5,0x55,0xe1,0xa2,0x14,0x85,0x68,0x52,0x28,0x3c,0x35,0x7b,0x55,0x2b,0x58,0xe9,0x29,0x22,0xc0,0xde,0xec,0x2c,0xe2,0xbe};
    sm2_fp_from_bytes(a, a26);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a27[32] = {0xd7,0x74,0x75,0x78,0xe7,0x1a,0x57,0x05,0x41,0x5c,0xd0,0x86,0x84,0x85,0x04,0xfb,0x92,0xcd,0xd7,0xcb,0x76,0xb3,0x7e,0x20,0x8a,0x3a,0x7f,0xac,0x50,0x0f,0x70,0x74};
    static std::uint8_t c27[32] = {0x28,0x8b,0x8a,0x86,0x18,0xe5,0xa8,0xfa,0xbe,0xa3,0x2f,0x79,0x7b,0x7a,0xfb,0x04,0x6d,0x32,0x28,0x33,0x89,0x4c,0x81,0xe0,0x75,0xc5,0x80,0x53,0xaf,0xf0,0x8f,0x8b};
    sm2_fp_from_bytes(a, a27);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a28[32] = {0xb5,0x28,0xab,0x08,0x94,0x78,0x6e,0x14,0xb8,0xab,0xfd,0x77,0xe7,0x0c,0x8f,0xfc,0x54,0x65,0x0f,0x5d,0x2f,0x19,0x24,0x9f,0x32,0x97,0x98,0xb1,0xe9,0x7f,0xca,0xd3};
    static std::uint8_t c28[32] = {0x4a,0xd7,0x54,0xf6,0x6b,0x87,0x91,0xeb,0x47,0x54,0x02,0x88,0x18,0xf3,0x70,0x03,0xab,0x9a,0xf0,0xa1,0xd0,0xe6,0xdb,0x61,0xcd,0x68,0x67,0x4e,0x16,0x80,0x35,0x2c};
    sm2_fp_from_bytes(a, a28);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a29[32] = {0xba,0x6c,0x72,0x45,0x62,0xd2,0x96,0xeb,0xd5,0x36,0xa9,0x9c,0xe7,0x8b,0x95,0x87,0x66,0x34,0xa2,0x72,0xd8,0x79,0x92,0x53,0x09,0x51,0xdf,0x81,0xfc,0x53,0x50,0xb7};
    static std::uint8_t c29[32] = {0x45,0x93,0x8d,0xb9,0x9d,0x2d,0x69,0x14,0x2a,0xc9,0x56,0x63,0x18,0x74,0x6a,0x78,0x99,0xcb,0x5d,0x8c,0x27,0x86,0x6d,0xad,0xf6,0xae,0x20,0x7e,0x03,0xac,0xaf,0x48};
    sm2_fp_from_bytes(a, a29);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a30[32] = {0x53,0x9d,0x1c,0x38,0xc8,0x1a,0x8d,0xb2,0xc8,0x80,0x68,0x4f,0xa4,0x91,0x6c,0xbd,0x97,0x6b,0x95,0xf9,0xd7,0x39,0xa6,0xb4,0x4c,0x77,0x9f,0xca,0x2a,0x85,0xb8,0x5c};
    static std::uint8_t c30[32] = {0xac,0x62,0xe3,0xc6,0x37,0xe5,0x72,0x4d,0x37,0x7f,0x97,0xb0,0x5b,0x6e,0x93,0x42,0x68,0x94,0x6a,0x05,0x28,0xc6,0x59,0x4c,0xb3,0x88,0x60,0x35,0xd5,0x7a,0x47,0xa3};
    sm2_fp_from_bytes(a, a30);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a31[32] = {0x94,0x06,0xcd,0x19,0xfd,0x54,0x10,0xd5,0x21,0x8f,0xc6,0x2c,0xa6,0x9d,0x13,0xe8,0xf8,0x08,0xd3,0x4e,0x90,0x38,0x0e,0xe2,0x12,0xb5,0x43,0x13,0xc3,0x5f,0xb3,0x09};
    static std::uint8_t c31[32] = {0x6b,0xf9,0x32,0xe5,0x02,0xab,0xef,0x2a,0xde,0x70,0x39,0xd3,0x59,0x62,0xec,0x17,0x07,0xf7,0x2c,0xb0,0x6f,0xc7,0xf1,0x1e,0xed,0x4a,0xbc,0xec,0x3c,0xa0,0x4c,0xf6};
    sm2_fp_from_bytes(a, a31);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a32[32] = {0x17,0x15,0x88,0x7e,0x12,0x8e,0xd3,0xb9,0x84,0x09,0x4a,0x1c,0xde,0x9a,0x4d,0xd6,0x9f,0xf9,0xd5,0x9e,0x28,0x47,0xa6,0x03,0x2c,0xe9,0xbe,0x7d,0xb5,0xf4,0x6b,0xe0};
    static std::uint8_t c32[32] = {0xe8,0xea,0x77,0x80,0xed,0x71,0x2c,0x46,0x7b,0xf6,0xb5,0xe3,0x21,0x65,0xb2,0x29,0x60,0x06,0x2a,0x60,0xd7,0xb8,0x59,0xfd,0xd3,0x16,0x41,0x82,0x4a,0x0b,0x94,0x1f};
    sm2_fp_from_bytes(a, a32);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a33[32] = {0x4c,0x1c,0x3a,0xe1,0x69,0xb0,0x4b,0x7e,0x83,0x53,0xb9,0x90,0x97,0x76,0xa0,0x5d,0xec,0xbd,0x86,0xfb,0x27,0x71,0x64,0xbf,0xd5,0x5c,0x3c,0xf0,0x37,0x4e,0x4d,0x1c};
    static std::uint8_t c33[32] = {0xb3,0xe3,0xc5,0x1d,0x96,0x4f,0xb4,0x81,0x7c,0xac,0x46,0x6f,0x68,0x89,0x5f,0xa2,0x13,0x42,0x79,0x03,0xd8,0x8e,0x9b,0x41,0x2a,0xa3,0xc3,0x0f,0xc8,0xb1,0xb2,0xe3};
    sm2_fp_from_bytes(a, a33);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a34[32] = {0xa0,0x39,0x38,0x48,0xe2,0xe7,0x11,0x9f,0xea,0x93,0x19,0xce,0x19,0xc1,0x3d,0x5c,0x7b,0x7e,0x4e,0x77,0x30,0xcd,0x66,0x2d,0xc8,0xc9,0x6d,0x4a,0x81,0x2e,0x35,0xdc};
    static std::uint8_t c34[32] = {0x5f,0xc6,0xc7,0xb6,0x1d,0x18,0xee,0x60,0x15,0x6c,0xe6,0x31,0xe6,0x3e,0xc2,0xa3,0x84,0x81,0xb1,0x87,0xcf,0x32,0x99,0xd3,0x37,0x36,0x92,0xb5,0x7e,0xd1,0xca,0x23};
    sm2_fp_from_bytes(a, a34);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a35[32] = {0x7a,0xd4,0x79,0x23,0x67,0x25,0x11,0xf3,0x68,0xea,0x9f,0x4b,0xc8,0x20,0xa8,0xca,0xad,0x88,0x0a,0x49,0x15,0x81,0xeb,0x8c,0x0d,0x0d,0x66,0x1e,0x80,0x84,0xcc,0x89};
    static std::uint8_t c35[32] = {0x85,0x2b,0x86,0xdb,0x98,0xda,0xee,0x0c,0x97,0x15,0x60,0xb4,0x37,0xdf,0x57,0x35,0x52,0x77,0xf5,0xb5,0xea,0x7e,0x14,0x74,0xf2,0xf2,0x99,0xe1,0x7f,0x7b,0x33,0x76};
    sm2_fp_from_bytes(a, a35);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a36[32] = {0xcb,0x6d,0x39,0x9d,0x90,0x9c,0x91,0x27,0xbc,0x8d,0x4d,0x63,0x22,0xb6,0x22,0xf0,0x53,0x7b,0x2d,0xa4,0x19,0x46,0x95,0x1e,0xb8,0x6f,0x7f,0xbd,0x07,0x2c,0xba,0x32};
    static std::uint8_t c36[32] = {0x34,0x92,0xc6,0x61,0x6f,0x63,0x6e,0xd8,0x43,0x72,0xb2,0x9c,0xdd,0x49,0xdd,0x0f,0xac,0x84,0xd2,0x5a,0xe6,0xb9,0x6a,0xe2,0x47,0x90,0x80,0x42,0xf8,0xd3,0x45,0xcd};
    sm2_fp_from_bytes(a, a36);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a37[32] = {0x93,0x2b,0xe8,0x89,0x63,0x2e,0xaf,0x5b,0xd0,0x08,0xb7,0x47,0xd2,0x03,0x58,0x12,0x8d,0xee,0x25,0xe1,0xe3,0x18,0x70,0xf9,0x83,0xb0,0x5d,0x7c,0x5e,0x2d,0x64,0x4e};
    static std::uint8_t c37[32] = {0x6c,0xd4,0x17,0x75,0x9c,0xd1,0x50,0xa4,0x2f,0xf7,0x48,0xb8,0x2d,0xfc,0xa7,0xed,0x72,0x11,0xda,0x1d,0x1c,0xe7,0x8f,0x07,0x7c,0x4f,0xa2,0x83,0xa1,0xd2,0x9b,0xb1};
    sm2_fp_from_bytes(a, a37);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a38[32] = {0xae,0xe1,0x79,0x72,0xfa,0xbf,0xb6,0x81,0x0d,0x91,0x8a,0xc2,0xf1,0x56,0xab,0x78,0x89,0x32,0xea,0x43,0xc5,0x86,0xc2,0x14,0x21,0x32,0x51,0x08,0x69,0xe1,0xb1,0x5f};
    static std::uint8_t c38[32] = {0x51,0x1e,0x86,0x8c,0x05,0x40,0x49,0x7e,0xf2,0x6e,0x75,0x3d,0x0e,0xa9,0x54,0x87,0x76,0xcd,0x15,0xbb,0x3a,0x79,0x3d,0xec,0xde,0xcd,0xae,0xf7,0x96,0x1e,0x4e,0xa0};
    sm2_fp_from_bytes(a, a38);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a39[32] = {0xf5,0x59,0x69,0x74,0x8f,0x63,0x92,0x69,0xe1,0x2e,0x58,0x6d,0xc9,0xdf,0x67,0xeb,0x46,0x00,0x41,0x9e,0xe8,0x45,0x73,0xbc,0x2d,0xe0,0xeb,0xf5,0xbb,0x36,0xb8,0x73};
    static std::uint8_t c39[32] = {0x0a,0xa6,0x96,0x8a,0x70,0x9c,0x6d,0x96,0x1e,0xd1,0xa7,0x92,0x36,0x20,0x98,0x14,0xb9,0xff,0xbe,0x60,0x17,0xba,0x8c,0x44,0xd2,0x1f,0x14,0x0a,0x44,0xc9,0x47,0x8c};
    sm2_fp_from_bytes(a, a39);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a40[32] = {0xd9,0x8b,0x6e,0x80,0xe5,0x1f,0x93,0x42,0x6f,0xf8,0xb6,0x6d,0xf8,0xa1,0x04,0xb5,0x21,0x09,0xd7,0xb5,0xc9,0x1f,0x85,0x31,0x55,0x18,0xd9,0x7d,0x54,0x10,0x96,0x0f};
    static std::uint8_t c40[32] = {0x26,0x74,0x91,0x7e,0x1a,0xe0,0x6c,0xbd,0x90,0x07,0x49,0x92,0x07,0x5e,0xfb,0x4a,0xde,0xf6,0x28,0x49,0x36,0xe0,0x7a,0xcf,0xaa,0xe7,0x26,0x82,0xab,0xef,0x69,0xf0};
    sm2_fp_from_bytes(a, a40);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a41[32] = {0x97,0x43,0xd4,0x97,0x8a,0x5a,0xa0,0x81,0xc2,0x43,0x3f,0x9d,0xeb,0xda,0x3e,0xa8,0xac,0x20,0x1e,0xf7,0x8a,0xe4,0x58,0xb8,0x27,0xd4,0x74,0xe0,0x2c,0x00,0x63,0xf3};
    static std::uint8_t c41[32] = {0x68,0xbc,0x2b,0x67,0x75,0xa5,0x5f,0x7e,0x3d,0xbc,0xc0,0x62,0x14,0x25,0xc1,0x57,0x53,0xdf,0xe1,0x07,0x75,0x1b,0xa7,0x48,0xd8,0x2b,0x8b,0x1f,0xd3,0xff,0x9c,0x0c};
    sm2_fp_from_bytes(a, a41);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a42[32] = {0x60,0x48,0xa8,0x77,0x89,0x89,0x90,0x6e,0xa7,0xc0,0x71,0x0c,0xcb,0x50,0x01,0x96,0x04,0x82,0xdc,0xff,0x99,0xce,0x19,0x05,0x8a,0x38,0x71,0x41,0xc6,0x0b,0x6c,0x72};
    static std::uint8_t c42[32] = {0x9f,0xb7,0x57,0x87,0x76,0x76,0x6f,0x91,0x58,0x3f,0x8e,0xf3,0x34,0xaf,0xfe,0x69,0xfb,0x7d,0x22,0xff,0x66,0x31,0xe6,0xfb,0x75,0xc7,0x8e,0xbe,0x39,0xf4,0x93,0x8d};
    sm2_fp_from_bytes(a, a42);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a43[32] = {0xb6,0x00,0x1c,0x46,0x82,0x3a,0xad,0x89,0x60,0xc5,0x95,0xf7,0x27,0xd6,0xb5,0x56,0x6f,0x71,0xde,0x03,0x31,0x9c,0xdb,0xe9,0x30,0xae,0xc3,0xd7,0xb8,0x20,0xbd,0x22};
    static std::uint8_t c43[32] = {0x49,0xff,0xe3,0xb8,0x7d,0xc5,0x52,0x76,0x9f,0x3a,0x6a,0x08,0xd8,0x29,0x4a,0xa9,0x90,0x8e,0x21,0xfb,0xce,0x63,0x24,0x17,0xcf,0x51,0x3c,0x28,0x47,0xdf,0x42,0xdd};
    sm2_fp_from_bytes(a, a43);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a44[32] = {0xd4,0x74,0x98,0x7c,0x61,0xf1,0x6e,0xeb,0xe7,0xfc,0xd9,0x12,0x06,0x9a,0xd4,0xe1,0xf7,0xe1,0x8f,0x54,0xf0,0xaf,0xe2,0x7c,0x81,0xfd,0x2c,0x84,0x0f,0x0c,0x91,0x33};
    static std::uint8_t c44[32] = {0x2b,0x8b,0x67,0x82,0x9e,0x0e,0x91,0x14,0x18,0x03,0x26,0xed,0xf9,0x65,0x2b,0x1e,0x08,0x1e,0x70,0xaa,0x0f,0x50,0x1d,0x84,0x7e,0x02,0xd3,0x7b,0xf0,0xf3,0x6e,0xcc};
    sm2_fp_from_bytes(a, a44);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a45[32] = {0x1b,0x34,0x2b,0xf6,0xed,0x9b,0x56,0xcb,0x62,0x2e,0x3f,0x63,0xb9,0x9a,0x4b,0x50,0x11,0x97,0x5d,0xab,0xe7,0xbc,0x5f,0x72,0xd8,0x00,0x14,0xfe,0xe1,0x0d,0xf8,0x57};
    static std::uint8_t c45[32] = {0xe4,0xcb,0xd4,0x08,0x12,0x64,0xa9,0x34,0x9d,0xd1,0xc0,0x9c,0x46,0x65,0xb4,0xaf,0xee,0x68,0xa2,0x53,0x18,0x43,0xa0,0x8e,0x27,0xff,0xeb,0x01,0x1e,0xf2,0x07,0xa8};
    sm2_fp_from_bytes(a, a45);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a46[32] = {0xba,0x9f,0xa2,0x82,0xf6,0xb8,0xf8,0x0e,0x55,0x11,0xd4,0xb5,0x5f,0xc3,0xaf,0x3d,0x90,0x6d,0x1f,0xc5,0x79,0x1b,0x37,0xf6,0x8c,0xbc,0xad,0x8e,0xb9,0x31,0x77,0x67};
    static std::uint8_t c46[32] = {0x45,0x60,0x5d,0x7c,0x09,0x47,0x07,0xf1,0xaa,0xee,0x2b,0x4a,0xa0,0x3c,0x50,0xc2,0x6f,0x92,0xe0,0x39,0x86,0xe4,0xc8,0x0a,0x73,0x43,0x52,0x71,0x46,0xce,0x88,0x98};
    sm2_fp_from_bytes(a, a46);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a47[32] = {0x44,0x54,0x27,0x71,0x57,0xcc,0x10,0x94,0x85,0xe9,0x37,0x45,0x93,0x93,0xaa,0x1e,0x97,0x70,0x99,0x4f,0xde,0xd6,0xdf,0x98,0x17,0xcf,0xb5,0x89,0x40,0x79,0xb1,0x1b};
    static std::uint8_t c47[32] = {0xbb,0xab,0xd8,0x8d,0xa8,0x33,0xef,0x6b,0x7a,0x16,0xc8,0xba,0x6c,0x6c,0x55,0xe1,0x68,0x8f,0x66,0xaf,0x21,0x29,0x20,0x68,0xe8,0x30,0x4a,0x76,0xbf,0x86,0x4e,0xe4};
    sm2_fp_from_bytes(a, a47);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a48[32] = {0xed,0xe9,0xbb,0x78,0xbf,0xca,0x68,0x82,0xe9,0x20,0x69,0xd4,0xd1,0x2d,0x6e,0x5f,0xea,0x2c,0x19,0x2c,0x45,0x61,0x29,0xe1,0x36,0x99,0xf2,0x66,0xa6,0x62,0xf9,0x5c};
    static std::uint8_t c48[32] = {0x12,0x16,0x44,0x86,0x40,0x35,0x97,0x7d,0x16,0xdf,0x96,0x2b,0x2e,0xd2,0x91,0xa0,0x15,0xd3,0xe6,0xd2,0xba,0x9e,0xd6,0x1f,0xc9,0x66,0x0d,0x99,0x59,0x9d,0x06,0xa3};
    sm2_fp_from_bytes(a, a48);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a49[32] = {0x78,0x30,0x24,0xe6,0x21,0x56,0x9b,0x3f,0x2a,0x75,0x3f,0x70,0xb2,0x77,0x88,0x0e,0x50,0xa6,0x00,0x5f,0x4a,0x9e,0x26,0x32,0x36,0xde,0x0d,0x54,0x9e,0x42,0x85,0x14};
    static std::uint8_t c49[32] = {0x87,0xcf,0xdb,0x18,0xde,0xa9,0x64,0xc0,0xd5,0x8a,0xc0,0x8f,0x4d,0x88,0x77,0xf1,0xaf,0x59,0xff,0x9f,0xb5,0x61,0xd9,0xce,0xc9,0x21,0xf2,0xab,0x61,0xbd,0x7a,0xeb};
    sm2_fp_from_bytes(a, a49);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a50[32] = {0xf3,0x99,0x0f,0x30,0x03,0x33,0x26,0xa8,0xd7,0x98,0xe1,0x6d,0x64,0xda,0x0f,0xb6,0x8a,0x1c,0x6e,0x56,0x3a,0xaa,0x89,0x27,0x7f,0x5c,0x8b,0x2c,0x6e,0x28,0x0a,0x0c};
    static std::uint8_t c50[32] = {0x0c,0x66,0xf0,0xce,0xfc,0xcc,0xd9,0x57,0x28,0x67,0x1e,0x92,0x9b,0x25,0xf0,0x49,0x75,0xe3,0x91,0xa8,0xc5,0x55,0x76,0xd9,0x80,0xa3,0x74,0xd3,0x91,0xd7,0xf5,0xf3};
    sm2_fp_from_bytes(a, a50);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a51[32] = {0x8a,0xda,0x2f,0x06,0x23,0xb5,0xfe,0xff,0x1a,0x5b,0x56,0x1f,0x97,0xc0,0x28,0xbd,0xdc,0x44,0xb8,0x58,0x63,0x8b,0xb5,0x41,0x00,0x00,0x05,0x79,0xed,0x85,0xd6,0x83};
    static std::uint8_t c51[32] = {0x75,0x25,0xd0,0xf8,0xdc,0x4a,0x01,0x00,0xe5,0xa4,0xa9,0xe0,0x68,0x3f,0xd7,0x42,0x23,0xbb,0x47,0xa6,0x9c,0x74,0x4a,0xbf,0xff,0xff,0xfa,0x86,0x12,0x7a,0x29,0x7c};
    sm2_fp_from_bytes(a, a51);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a52[32] = {0x99,0xb1,0x9c,0x67,0x1a,0x67,0xcb,0x35,0x25,0x43,0x80,0x96,0x8c,0x40,0x44,0x42,0x3f,0xf6,0xd3,0x59,0x73,0x1e,0x88,0xf9,0xcc,0xbb,0x2a,0x43,0x93,0x6b,0x5a,0x50};
    static std::uint8_t c52[32] = {0x66,0x4e,0x63,0x97,0xe5,0x98,0x34,0xca,0xda,0xbc,0x7f,0x69,0x73,0xbf,0xbb,0xbd,0xc0,0x09,0x2c,0xa5,0x8c,0xe1,0x77,0x07,0x33,0x44,0xd5,0xbc,0x6c,0x94,0xa5,0xaf};
    sm2_fp_from_bytes(a, a52);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a53[32] = {0xf2,0x19,0x0e,0x59,0x2e,0x7f,0x12,0xca,0x5b,0x9b,0x42,0x2b,0xd1,0xaa,0x9c,0xa9,0x69,0x29,0xb5,0xf2,0x00,0x58,0xf5,0x19,0x4f,0xb8,0xdf,0x59,0xb3,0x6e,0x8e,0x06};
    static std::uint8_t c53[32] = {0x0d,0xe6,0xf1,0xa5,0xd1,0x80,0xed,0x35,0xa4,0x64,0xbd,0xd4,0x2e,0x55,0x63,0x56,0x96,0xd6,0x4a,0x0c,0xff,0xa7,0x0a,0xe7,0xb0,0x47,0x20,0xa6,0x4c,0x91,0x71,0xf9};
    sm2_fp_from_bytes(a, a53);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a54[32] = {0xb0,0x46,0xea,0x53,0x52,0xf5,0xa9,0xc9,0x2f,0xcf,0x92,0x65,0x05,0x4e,0xf9,0x0c,0x38,0xaf,0x38,0xb9,0x79,0xc7,0x61,0x3d,0x5d,0x42,0x08,0x71,0x46,0xeb,0x82,0xef};
    static std::uint8_t c54[32] = {0x4f,0xb9,0x15,0xab,0xad,0x0a,0x56,0x36,0xd0,0x30,0x6d,0x9a,0xfa,0xb1,0x06,0xf3,0xc7,0x50,0xc7,0x45,0x86,0x38,0x9e,0xc3,0xa2,0xbd,0xf7,0x8e,0xb9,0x14,0x7d,0x10};
    sm2_fp_from_bytes(a, a54);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a55[32] = {0x94,0xff,0x21,0x56,0x11,0xa7,0x0a,0xe1,0xc3,0x33,0xab,0x85,0x7d,0x63,0xb5,0x0e,0xa9,0x76,0x1e,0xee,0x5e,0x58,0x17,0x82,0xb0,0x98,0xff,0x29,0x9a,0x7e,0x46,0xa7};
    static std::uint8_t c55[32] = {0x6b,0x00,0xde,0xa8,0xee,0x58,0xf5,0x1e,0x3c,0xcc,0x54,0x7a,0x82,0x9c,0x4a,0xf1,0x56,0x89,0xe1,0x10,0xa1,0xa7,0xe8,0x7e,0x4f,0x67,0x00,0xd6,0x65,0x81,0xb9,0x58};
    sm2_fp_from_bytes(a, a55);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a56[32] = {0x78,0x2d,0x81,0x79,0x9d,0x82,0x7b,0x03,0xc1,0x9b,0x2a,0x17,0x08,0xfa,0xaa,0x20,0x55,0xa0,0x75,0x57,0x3c,0xd5,0x4f,0x4e,0x49,0xe8,0x54,0xc0,0x37,0x14,0x57,0xc8};
    static std::uint8_t c56[32] = {0x87,0xd2,0x7e,0x85,0x62,0x7d,0x84,0xfc,0x3e,0x64,0xd5,0xe8,0xf7,0x05,0x55,0xdf,0xaa,0x5f,0x8a,0xa7,0xc3,0x2a,0xb0,0xb2,0xb6,0x17,0xab,0x3f,0xc8,0xeb,0xa8,0x37};
    sm2_fp_from_bytes(a, a56);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a57[32] = {0x30,0x8c,0xeb,0x48,0xe9,0x06,0x2a,0x2a,0x55,0x77,0x11,0xba,0x93,0xed,0x81,0x30,0x97,0xb0,0xc0,0xd7,0x7c,0xe5,0x9b,0x9c,0x74,0x65,0x73,0x8a,0x22,0xf7,0x94,0x4b};
    static std::uint8_t c57[32] = {0xcf,0x73,0x14,0xb6,0x16,0xf9,0xd5,0xd5,0xaa,0x88,0xee,0x45,0x6c,0x12,0x7e,0xcf,0x68,0x4f,0x3f,0x27,0x83,0x1a,0x64,0x64,0x8b,0x9a,0x8c,0x75,0xdd,0x08,0x6b,0xb4};
    sm2_fp_from_bytes(a, a57);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a58[32] = {0x2c,0x71,0x7b,0x04,0x18,0xfa,0xf9,0xa8,0x0f,0x25,0x33,0x43,0x47,0x56,0x84,0xea,0x87,0x80,0x2f,0xf3,0x6f,0x40,0xc7,0xc3,0x37,0x54,0x1a,0xb7,0xda,0x1c,0xfe,0xaa};
    static std::uint8_t c58[32] = {0xd3,0x8e,0x84,0xfa,0xe7,0x05,0x06,0x57,0xf0,0xda,0xcc,0xbc,0xb8,0xa9,0x7b,0x15,0x78,0x7f,0xd0,0x0b,0x90,0xbf,0x38,0x3d,0xc8,0xab,0xe5,0x48,0x25,0xe3,0x01,0x55};
    sm2_fp_from_bytes(a, a58);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a59[32] = {0xc6,0xf6,0x1f,0x31,0xb2,0xe9,0xc0,0x0a,0x9d,0x7b,0x77,0x49,0x4b,0xd3,0x9a,0xef,0xee,0x1e,0x9a,0xa7,0x2d,0x65,0x54,0xa5,0xe9,0x36,0x33,0x09,0xb6,0xac,0x9c,0x97};
    static std::uint8_t c59[32] = {0x39,0x09,0xe0,0xcd,0x4d,0x16,0x3f,0xf5,0x62,0x84,0x88,0xb6,0xb4,0x2c,0x65,0x10,0x11,0xe1,0x65,0x57,0xd2,0x9a,0xab,0x5b,0x16,0xc9,0xcc,0xf6,0x49,0x53,0x63,0x68};
    sm2_fp_from_bytes(a, a59);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a60[32] = {0x24,0x18,0x71,0xcb,0x21,0xee,0x62,0x1a,0x81,0x7e,0x13,0x99,0xe7,0xae,0xf9,0xe1,0x8e,0x4b,0x8b,0x43,0x63,0x2e,0xc8,0x4e,0x8e,0xda,0xf8,0x52,0xe7,0x75,0x81,0x23};
    static std::uint8_t c60[32] = {0xdb,0xe7,0x8e,0x33,0xde,0x11,0x9d,0xe5,0x7e,0x81,0xec,0x66,0x18,0x51,0x06,0x1e,0x71,0xb4,0x74,0xbb,0x9c,0xd1,0x37,0xb2,0x71,0x25,0x07,0xad,0x18,0x8a,0x7e,0xdc};
    sm2_fp_from_bytes(a, a60);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a61[32] = {0x14,0xbd,0x70,0xc5,0x2e,0x7b,0x2e,0x3a,0x9d,0xd9,0x1b,0x52,0x16,0xcd,0x87,0xb1,0x77,0x0c,0x3a,0x60,0x2f,0x75,0x40,0xe9,0x58,0x94,0x98,0x3f,0x5f,0x6e,0xd6,0xb1};
    static std::uint8_t c61[32] = {0xeb,0x42,0x8f,0x39,0xd1,0x84,0xd1,0xc5,0x62,0x26,0xe4,0xad,0xe9,0x32,0x78,0x4e,0x88,0xf3,0xc5,0x9e,0xd0,0x8a,0xbf,0x17,0xa7,0x6b,0x67,0xc0,0xa0,0x91,0x29,0x4e};
    sm2_fp_from_bytes(a, a61);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a62[32] = {0x87,0x34,0x38,0xe3,0x92,0xa4,0x8a,0x72,0x6c,0x75,0x08,0x76,0x54,0x19,0x5b,0x49,0x18,0xee,0xcc,0x48,0xc1,0xb3,0x04,0xc8,0x65,0xa5,0xe4,0x4e,0x35,0x8d,0xc2,0xee};
    static std::uint8_t c62[32] = {0x78,0xcb,0xc7,0x1b,0x6d,0x5b,0x75,0x8d,0x93,0x8a,0xf7,0x89,0xab,0xe6,0xa4,0xb6,0xe7,0x11,0x33,0xb6,0x3e,0x4c,0xfb,0x38,0x9a,0x5a,0x1b,0xb1,0xca,0x72,0x3d,0x11};
    sm2_fp_from_bytes(a, a62);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a63[32] = {0xf3,0x9d,0xad,0x7a,0x45,0xa6,0x82,0xc1,0x97,0x95,0x24,0xe3,0x53,0xad,0x67,0x1b,0x13,0x06,0x9d,0x7c,0xc0,0x8c,0xf6,0xe7,0x7e,0x88,0x3e,0x25,0x1e,0x26,0x59,0x98};
    static std::uint8_t c63[32] = {0x0c,0x62,0x52,0x84,0xba,0x59,0x7d,0x3e,0x68,0x6a,0xdb,0x1c,0xac,0x52,0x98,0xe4,0xec,0xf9,0x62,0x82,0x3f,0x73,0x09,0x19,0x81,0x77,0xc1,0xda,0xe1,0xd9,0xa6,0x67};
    sm2_fp_from_bytes(a, a63);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a64[32] = {0xba,0x44,0x69,0x17,0x27,0x85,0xee,0xae,0x48,0xe6,0x67,0x07,0xb1,0x1d,0x20,0xc5,0x14,0xa5,0xfb,0x39,0x13,0xe0,0x78,0xbd,0x55,0x24,0x0e,0x5d,0xdd,0x53,0xe9,0x33};
    static std::uint8_t c64[32] = {0x45,0xbb,0x96,0xe7,0xd8,0x7a,0x11,0x51,0xb7,0x19,0x98,0xf8,0x4e,0xe2,0xdf,0x3a,0xeb,0x5a,0x04,0xc5,0xec,0x1f,0x87,0x43,0xaa,0xdb,0xf1,0xa2,0x22,0xac,0x16,0xcc};
    sm2_fp_from_bytes(a, a64);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a65[32] = {0x53,0xcd,0xf8,0xd5,0x2b,0x26,0x14,0x9f,0x7a,0x29,0x31,0xb8,0x9e,0xca,0x8e,0xa8,0xb4,0xd9,0xd3,0xa5,0x41,0xd8,0x92,0x21,0x45,0x3b,0xdd,0x9b,0x05,0xda,0x2f,0x70};
    static std::uint8_t c65[32] = {0xac,0x32,0x07,0x29,0xd4,0xd9,0xeb,0x60,0x85,0xd6,0xce,0x47,0x61,0x35,0x71,0x57,0x4b,0x26,0x2c,0x59,0xbe,0x27,0x6d,0xdf,0xba,0xc4,0x22,0x64,0xfa,0x25,0xd0,0x8f};
    sm2_fp_from_bytes(a, a65);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a66[32] = {0x95,0xc5,0x21,0x45,0xef,0x65,0xe1,0x46,0x78,0xe6,0x83,0x41,0xb7,0xaa,0x49,0x9e,0x93,0x8f,0x76,0xd1,0x79,0x2a,0x69,0xf1,0xd2,0x83,0x36,0x96,0x9c,0xcc,0xfd,0x43};
    static std::uint8_t c66[32] = {0x6a,0x3a,0xde,0xb9,0x10,0x9a,0x1e,0xb9,0x87,0x19,0x7c,0xbe,0x48,0x55,0xb6,0x61,0x6c,0x70,0x89,0x2d,0x86,0xd5,0x96,0x0f,0x2d,0x7c,0xc9,0x69,0x63,0x33,0x02,0xbc};
    sm2_fp_from_bytes(a, a66);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a67[32] = {0x50,0xb1,0x40,0xa3,0x72,0x00,0xf2,0x49,0x4a,0xbf,0x13,0x5b,0xf2,0xe5,0x8b,0x35,0xa2,0x93,0xdd,0x28,0x04,0xa5,0xd9,0xce,0x8e,0x06,0x3c,0x5f,0x48,0xaa,0x8f,0xe0};
    static std::uint8_t c67[32] = {0xaf,0x4e,0xbf,0x5b,0x8d,0xff,0x0d,0xb6,0xb5,0x40,0xec,0xa4,0x0d,0x1a,0x74,0xca,0x5d,0x6c,0x22,0xd6,0xfb,0x5a,0x26,0x32,0x71,0xf9,0xc3,0xa0,0xb7,0x55,0x70,0x1f};
    sm2_fp_from_bytes(a, a67);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a68[32] = {0xc3,0x8c,0xf9,0x10,0x92,0x1c,0xe2,0x47,0xf7,0xd5,0x92,0x26,0x01,0x3e,0x30,0x1a,0x96,0xb8,0xef,0x70,0xc5,0xa3,0x28,0x7e,0x7b,0xd7,0xf1,0xcd,0x03,0xa0,0xc9,0xc4};
    static std::uint8_t c68[32] = {0x3c,0x73,0x06,0xee,0x6d,0xe3,0x1d,0xb8,0x08,0x2a,0x6d,0xd9,0xfe,0xc1,0xcf,0xe5,0x69,0x47,0x10,0x8e,0x3a,0x5c,0xd7,0x82,0x84,0x28,0x0e,0x32,0xfc,0x5f,0x36,0x3b};
    sm2_fp_from_bytes(a, a68);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a69[32] = {0xbe,0xbe,0xb2,0x76,0xcf,0x44,0x84,0x38,0xd7,0xf2,0x7e,0x28,0xc4,0xb9,0x3c,0x8e,0xe6,0xc1,0x86,0x39,0xab,0x08,0x8b,0xf5,0x20,0x62,0xb5,0xe8,0x16,0x02,0xd2,0xd5};
    static std::uint8_t c69[32] = {0x41,0x41,0x4d,0x88,0x30,0xbb,0x7b,0xc7,0x28,0x0d,0x81,0xd7,0x3b,0x46,0xc3,0x71,0x19,0x3e,0x79,0xc5,0x54,0xf7,0x74,0x0b,0xdf,0x9d,0x4a,0x17,0xe9,0xfd,0x2d,0x2a};
    sm2_fp_from_bytes(a, a69);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a70[32] = {0xc6,0xef,0x0d,0xa7,0x9c,0xe6,0x9c,0x4e,0x8c,0xaa,0x25,0x56,0x13,0x3f,0x97,0x27,0xbb,0x6f,0xec,0x54,0x0a,0x5b,0x95,0x51,0x2e,0x7f,0x3f,0xe2,0xe4,0x69,0xd0,0xe7};
    static std::uint8_t c70[32] = {0x39,0x10,0xf2,0x57,0x63,0x19,0x63,0xb1,0x73,0x55,0xda,0xa9,0xec,0xc0,0x68,0xd8,0x44,0x90,0x13,0xaa,0xf5,0xa4,0x6a,0xaf,0xd1,0x80,0xc0,0x1d,0x1b,0x96,0x2f,0x18};
    sm2_fp_from_bytes(a, a70);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a71[32] = {0x15,0xda,0xf0,0x38,0x77,0x6b,0xbd,0x13,0x58,0xc3,0x36,0xfe,0x6d,0x74,0x28,0x17,0xd0,0x72,0x33,0x82,0x96,0xe7,0x47,0xc1,0xa9,0xe3,0x91,0xe0,0xac,0xe3,0x2b,0x6c};
    static std::uint8_t c71[32] = {0xea,0x25,0x0f,0xc6,0x88,0x94,0x42,0xec,0xa7,0x3c,0xc9,0x01,0x92,0x8b,0xd7,0xe8,0x2f,0x8d,0xcc,0x7c,0x69,0x18,0xb8,0x3f,0x56,0x1c,0x6e,0x1f,0x53,0x1c,0xd4,0x93};
    sm2_fp_from_bytes(a, a71);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a72[32] = {0x9b,0xc4,0x07,0x3e,0xfd,0x46,0xb2,0x1c,0x0d,0x0f,0xcc,0xe0,0xe6,0x44,0x6f,0x2f,0x72,0x30,0x8d,0xb5,0x16,0x92,0x49,0x56,0x5b,0xb5,0x53,0xa5,0x92,0x39,0xe0,0xda};
    static std::uint8_t c72[32] = {0x64,0x3b,0xf8,0xc0,0x02,0xb9,0x4d,0xe3,0xf2,0xf0,0x33,0x1f,0x19,0xbb,0x90,0xd0,0x8d,0xcf,0x72,0x49,0xe9,0x6d,0xb6,0xaa,0xa4,0x4a,0xac,0x5a,0x6d,0xc6,0x1f,0x25};
    sm2_fp_from_bytes(a, a72);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a73[32] = {0x3d,0x97,0xee,0xa3,0xe9,0xac,0x45,0x64,0xd3,0x71,0x4f,0xeb,0x49,0xee,0x03,0xd4,0x04,0x4c,0xcd,0xe7,0x00,0x54,0xe3,0xcb,0x90,0xb4,0xa6,0x94,0xc7,0x3f,0xdd,0xf3};
    static std::uint8_t c73[32] = {0xc2,0x68,0x11,0x5b,0x16,0x53,0xba,0x9b,0x2c,0x8e,0xb0,0x14,0xb6,0x11,0xfc,0x2b,0xfb,0xb3,0x32,0x17,0xff,0xab,0x1c,0x35,0x6f,0x4b,0x59,0x6b,0x38,0xc0,0x22,0x0c};
    sm2_fp_from_bytes(a, a73);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a74[32] = {0x1e,0x11,0x4a,0x82,0xdb,0x91,0x21,0xd8,0xc6,0x54,0x00,0xf6,0x12,0xa8,0xc7,0x80,0x7b,0xa2,0xca,0x60,0x56,0xa3,0x61,0x97,0xcb,0xf7,0xd4,0x2a,0x23,0x3b,0x96,0x49};
    static std::uint8_t c74[32] = {0xe1,0xee,0xb5,0x7c,0x24,0x6e,0xde,0x27,0x39,0xab,0xff,0x09,0xed,0x57,0x38,0x7f,0x84,0x5d,0x35,0x9e,0xa9,0x5c,0x9e,0x69,0x34,0x08,0x2b,0xd5,0xdc,0xc4,0x69,0xb6};
    sm2_fp_from_bytes(a, a74);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a75[32] = {0xc7,0x58,0x11,0x32,0x86,0xa6,0xad,0x00,0x39,0x93,0x83,0x28,0xb0,0x5c,0xd0,0xba,0x20,0xd7,0x7b,0x91,0x9c,0x6c,0x15,0x66,0x98,0xe6,0xf4,0xb6,0x97,0x84,0x38,0xa1};
    static std::uint8_t c75[32] = {0x38,0xa7,0xee,0xcc,0x79,0x59,0x52,0xff,0xc6,0x6c,0x7c,0xd7,0x4f,0xa3,0x2f,0x45,0xdf,0x28,0x84,0x6d,0x63,0x93,0xea,0x9a,0x67,0x19,0x0b,0x49,0x68,0x7b,0xc7,0x5e};
    sm2_fp_from_bytes(a, a75);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a76[32] = {0x64,0xb3,0xa7,0xd5,0x52,0x22,0x9e,0x89,0x26,0x06,0x90,0xfa,0x4e,0x9d,0x0c,0x50,0xc1,0x04,0x19,0xc9,0xe9,0xc8,0x1c,0xb0,0x89,0x42,0x81,0x51,0x4d,0xf4,0xf2,0x78};
    static std::uint8_t c76[32] = {0x9b,0x4c,0x58,0x29,0xad,0xdd,0x61,0x76,0xd9,0xf9,0x6f,0x05,0xb1,0x62,0xf3,0xaf,0x3e,0xfb,0xe6,0x35,0x16,0x37,0xe3,0x50,0x76,0xbd,0x7e,0xae,0xb2,0x0b,0x0d,0x87};
    sm2_fp_from_bytes(a, a76);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a77[32] = {0xe1,0xf4,0x22,0x26,0x15,0x8e,0x32,0xaa,0xce,0x7e,0xea,0x8e,0x79,0x9c,0x2b,0x21,0xb1,0x05,0x8f,0x89,0x01,0x66,0x3a,0x28,0x0b,0x50,0x20,0x03,0x31,0x0c,0xb6,0x9d};
    static std::uint8_t c77[32] = {0x1e,0x0b,0xdd,0xd8,0xea,0x71,0xcd,0x55,0x31,0x81,0x15,0x71,0x86,0x63,0xd4,0xde,0x4e,0xfa,0x70,0x75,0xfe,0x99,0xc5,0xd8,0xf4,0xaf,0xdf,0xfc,0xce,0xf3,0x49,0x62};
    sm2_fp_from_bytes(a, a77);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a78[32] = {0xee,0x40,0x2c,0x84,0x6a,0x34,0x40,0x9e,0x66,0xdf,0x85,0xc1,0x95,0xf8,0x86,0x35,0xe6,0xfc,0x38,0x55,0xe4,0x23,0xe6,0x7a,0xa5,0xf0,0xb7,0xf7,0x0b,0x1d,0x4e,0x09};
    static std::uint8_t c78[32] = {0x11,0xbf,0xd3,0x7a,0x95,0xcb,0xbf,0x61,0x99,0x20,0x7a,0x3e,0x6a,0x07,0x79,0xca,0x19,0x03,0xc7,0xa9,0x1b,0xdc,0x19,0x86,0x5a,0x0f,0x48,0x08,0xf4,0xe2,0xb1,0xf6};
    sm2_fp_from_bytes(a, a78);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a79[32] = {0x74,0xad,0x1c,0x38,0xde,0xdf,0x3f,0x3b,0x2a,0x0b,0x83,0x71,0x37,0x40,0xf9,0x4f,0x96,0x88,0x08,0x12,0x3c,0xae,0x67,0x32,0xb8,0xcd,0x01,0xd3,0xc1,0x49,0x57,0xfd};
    static std::uint8_t c79[32] = {0x8b,0x52,0xe3,0xc6,0x21,0x20,0xc0,0xc4,0xd5,0xf4,0x7c,0x8e,0xc8,0xbf,0x06,0xb0,0x69,0x77,0xf7,0xec,0xc3,0x51,0x98,0xce,0x47,0x32,0xfe,0x2c,0x3e,0xb6,0xa8,0x02};
    sm2_fp_from_bytes(a, a79);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a80[32] = {0xd0,0xb0,0x03,0x4c,0xb3,0x18,0x18,0x6f,0xdb,0xe8,0xd8,0x1f,0x32,0x80,0x9f,0xe5,0x18,0xf0,0xd4,0xd1,0xd5,0x3c,0x1e,0xcd,0xb8,0x71,0x96,0x5d,0x3f,0xd2,0xac,0xb4};
    static std::uint8_t c80[32] = {0x2f,0x4f,0xfc,0xb2,0x4c,0xe7,0xe7,0x90,0x24,0x17,0x27,0xe0,0xcd,0x7f,0x60,0x1a,0xe7,0x0f,0x2b,0x2d,0x2a,0xc3,0xe1,0x33,0x47,0x8e,0x69,0xa2,0xc0,0x2d,0x53,0x4b};
    sm2_fp_from_bytes(a, a80);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a81[32] = {0x60,0xa3,0xb6,0x47,0x25,0xca,0xdd,0x9e,0xd0,0xe6,0x03,0xad,0xfb,0x09,0xb3,0x08,0x29,0xc0,0x8f,0xac,0x8f,0x03,0x08,0x34,0x23,0xe7,0x0d,0x37,0xf5,0x01,0x43,0x29};
    static std::uint8_t c81[32] = {0x9f,0x5c,0x49,0xb7,0xda,0x35,0x22,0x61,0x2f,0x19,0xfc,0x52,0x04,0xf6,0x4c,0xf7,0xd6,0x3f,0x70,0x52,0x70,0xfc,0xf7,0xcc,0xdc,0x18,0xf2,0xc8,0x0a,0xfe,0xbc,0xd6};
    sm2_fp_from_bytes(a, a81);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a82[32] = {0x80,0xfd,0xa8,0x60,0x22,0x0b,0x75,0x3f,0x2d,0x34,0x16,0xd8,0xee,0x37,0xec,0x66,0xe8,0x76,0xf0,0x3a,0x52,0x60,0xe9,0xc4,0x42,0x93,0x8b,0x33,0x1e,0x9a,0xca,0x06};
    static std::uint8_t c82[32] = {0x7f,0x02,0x57,0x9e,0xdd,0xf4,0x8a,0xc0,0xd2,0xcb,0xe9,0x27,0x11,0xc8,0x13,0x99,0x17,0x89,0x0f,0xc4,0xad,0x9f,0x16,0x3c,0xbd,0x6c,0x74,0xcc,0xe1,0x65,0x35,0xf9};
    sm2_fp_from_bytes(a, a82);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a83[32] = {0x7d,0x84,0x3f,0x31,0xdd,0xd2,0xed,0xbb,0x8f,0x1e,0xcb,0xe8,0xc2,0xd7,0x09,0x60,0x7e,0x9e,0x5f,0x8d,0x13,0xc2,0xef,0xc6,0x83,0x6b,0xcd,0x04,0xc7,0x0f,0x48,0xc0};
    static std::uint8_t c83[32] = {0x82,0x7b,0xc0,0xcd,0x22,0x2d,0x12,0x44,0x70,0xe1,0x34,0x17,0x3d,0x28,0xf6,0x9f,0x81,0x61,0xa0,0x71,0xec,0x3d,0x10,0x3a,0x7c,0x94,0x32,0xfb,0x38,0xf0,0xb7,0x3f};
    sm2_fp_from_bytes(a, a83);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a84[32] = {0xcf,0x67,0x52,0xf7,0x46,0x5d,0x64,0x68,0x70,0xd0,0x94,0x22,0xb9,0x87,0xeb,0xf9,0x8e,0x03,0x75,0x1a,0x3e,0x93,0x65,0x25,0x7d,0x38,0x1e,0xec,0xc6,0xe9,0x87,0x70};
    static std::uint8_t c84[32] = {0x30,0x98,0xad,0x07,0xb9,0xa2,0x9b,0x97,0x8f,0x2f,0x6b,0xdd,0x46,0x78,0x14,0x06,0x71,0xfc,0x8a,0xe4,0xc1,0x6c,0x9a,0xdb,0x82,0xc7,0xe1,0x13,0x39,0x16,0x78,0x8f};
    sm2_fp_from_bytes(a, a84);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a85[32] = {0xba,0xb8,0xf0,0xe5,0xc8,0x76,0x7a,0xf5,0x73,0xe2,0x00,0xf9,0xe0,0x10,0x07,0xa2,0xc3,0x8d,0x49,0x7f,0x21,0x4b,0x49,0x9a,0xcb,0x00,0x3d,0x66,0xb5,0x45,0x2c,0xc9};
    static std::uint8_t c85[32] = {0x45,0x47,0x0f,0x19,0x37,0x89,0x85,0x0a,0x8c,0x1d,0xff,0x06,0x1f,0xef,0xf8,0x5d,0x3c,0x72,0xb6,0x7f,0xde,0xb4,0xb6,0x66,0x34,0xff,0xc2,0x99,0x4a,0xba,0xd3,0x36};
    sm2_fp_from_bytes(a, a85);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a86[32] = {0x5b,0x9c,0x51,0xc9,0xa1,0x7f,0xc9,0xe0,0x99,0xf4,0x60,0x9f,0x8d,0x15,0x4a,0x5b,0xd3,0x00,0x4a,0xd9,0x9d,0x01,0x0b,0x62,0xd7,0xe8,0xbb,0x3d,0xde,0xab,0xb4,0x27};
    static std::uint8_t c86[32] = {0xa4,0x63,0xae,0x35,0x5e,0x80,0x36,0x1f,0x66,0x0b,0x9f,0x60,0x72,0xea,0xb5,0xa4,0x2c,0xff,0xb5,0x25,0x62,0xfe,0xf4,0x9e,0x28,0x17,0x44,0xc2,0x21,0x54,0x4b,0xd8};
    sm2_fp_from_bytes(a, a86);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a87[32] = {0x78,0xb7,0x85,0xc5,0x68,0xfc,0xb8,0x9d,0x5a,0xf8,0xaa,0xfc,0xbb,0xaa,0x57,0xd5,0xb3,0xf7,0x29,0xb7,0xcf,0x46,0xa2,0xe2,0xfa,0x12,0xf8,0xee,0x45,0x54,0x98,0x5d};
    static std::uint8_t c87[32] = {0x87,0x48,0x7a,0x39,0x97,0x03,0x47,0x62,0xa5,0x07,0x55,0x03,0x44,0x55,0xa8,0x2a,0x4c,0x08,0xd6,0x47,0x30,0xb9,0x5d,0x1e,0x05,0xed,0x07,0x11,0xba,0xab,0x67,0xa2};
    sm2_fp_from_bytes(a, a87);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a88[32] = {0xe9,0x84,0xec,0x2e,0xe7,0x6b,0xa4,0xeb,0xd4,0xc1,0xeb,0xd4,0x64,0xe8,0x2f,0xc1,0x61,0x3a,0x3f,0x2b,0xb5,0x4c,0x65,0xf7,0x22,0x79,0xd0,0x22,0xb4,0x47,0x5f,0x98};
    static std::uint8_t c88[32] = {0x16,0x7b,0x13,0xd0,0x18,0x94,0x5b,0x14,0x2b,0x3e,0x14,0x2b,0x9b,0x17,0xd0,0x3e,0x9e,0xc5,0xc0,0xd3,0x4a,0xb3,0x9a,0x09,0xdd,0x86,0x2f,0xdd,0x4b,0xb8,0xa0,0x67};
    sm2_fp_from_bytes(a, a88);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a89[32] = {0xe7,0x8c,0xfb,0xae,0xfa,0x7e,0xd2,0x63,0xfa,0x0c,0x41,0xc6,0xba,0x72,0x6e,0x5c,0x22,0x25,0xb5,0x2f,0xdb,0xe3,0xd1,0xe1,0xb9,0x62,0x11,0xd5,0x8f,0xff,0x3b,0xee};
    static std::uint8_t c89[32] = {0x18,0x73,0x04,0x50,0x05,0x81,0x2d,0x9c,0x05,0xf3,0xbe,0x39,0x45,0x8d,0x91,0xa3,0xdd,0xda,0x4a,0xcf,0x24,0x1c,0x2e,0x1f,0x46,0x9d,0xee,0x2a,0x70,0x00,0xc4,0x11};
    sm2_fp_from_bytes(a, a89);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a90[32] = {0x6d,0xf4,0x3a,0xef,0xb8,0xa6,0x4d,0xc9,0x43,0x3c,0xd2,0xf5,0x65,0x9d,0x16,0x56,0xf6,0x42,0x7e,0x15,0xb2,0x21,0x89,0x13,0xb5,0xa1,0x39,0xf5,0x5b,0x07,0x4e,0xc6};
    static std::uint8_t c90[32] = {0x92,0x0b,0xc5,0x0f,0x47,0x59,0xb2,0x36,0xbc,0xc3,0x2d,0x0a,0x9a,0x62,0xe9,0xa9,0x09,0xbd,0x81,0xe9,0x4d,0xde,0x76,0xed,0x4a,0x5e,0xc6,0x0a,0xa4,0xf8,0xb1,0x39};
    sm2_fp_from_bytes(a, a90);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a91[32] = {0xee,0x66,0x7b,0x75,0xbd,0x8b,0xcb,0xd9,0x56,0xdb,0xe7,0x30,0x48,0x5e,0xc1,0x98,0xbe,0x15,0xe3,0x37,0x25,0x23,0xfe,0xa2,0x79,0x54,0xce,0x93,0xbc,0xa7,0x82,0x49};
    static std::uint8_t c91[32] = {0x11,0x99,0x84,0x89,0x42,0x74,0x34,0x26,0xa9,0x24,0x18,0xcf,0xb7,0xa1,0x3e,0x67,0x41,0xea,0x1c,0xc7,0xda,0xdc,0x01,0x5e,0x86,0xab,0x31,0x6c,0x43,0x58,0x7d,0xb6};
    sm2_fp_from_bytes(a, a91);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a92[32] = {0x07,0xa6,0x7e,0x14,0xe7,0x80,0x97,0x3d,0x1b,0xa2,0x44,0x30,0x89,0x87,0x94,0x8d,0x01,0x5c,0xd7,0x26,0x26,0xeb,0xe4,0xe9,0x1e,0x0e,0x09,0xd6,0x7e,0x0c,0x50,0x2c};
    static std::uint8_t c92[32] = {0xf8,0x59,0x81,0xea,0x18,0x7f,0x68,0xc2,0xe4,0x5d,0xbb,0xcf,0x76,0x78,0x6b,0x72,0xfe,0xa3,0x28,0xd8,0xd9,0x14,0x1b,0x17,0xe1,0xf1,0xf6,0x29,0x81,0xf3,0xaf,0xd3};
    sm2_fp_from_bytes(a, a92);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a93[32] = {0x17,0x22,0x70,0x68,0x20,0x0a,0x7b,0xde,0x35,0xe9,0x1a,0x79,0xe5,0x37,0x10,0x57,0x4c,0x0d,0xfb,0x3e,0x4e,0xe4,0x96,0x91,0x38,0x09,0xae,0x70,0xb7,0x42,0xcb,0xa4};
    static std::uint8_t c93[32] = {0xe8,0xdd,0x8f,0x96,0xdf,0xf5,0x84,0x21,0xca,0x16,0xe5,0x86,0x1a,0xc8,0xef,0xa8,0xb3,0xf2,0x04,0xc0,0xb1,0x1b,0x69,0x6f,0xc7,0xf6,0x51,0x8f,0x48,0xbd,0x34,0x5b};
    sm2_fp_from_bytes(a, a93);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a94[32] = {0x55,0x28,0x3f,0xcc,0x6c,0x1e,0x83,0x60,0x64,0x59,0x4d,0xb3,0x33,0x73,0x1e,0x8c,0x67,0xb2,0xe7,0xcd,0x48,0x44,0x14,0xe1,0xea,0xca,0xde,0xd9,0xd8,0x99,0x8e,0xdb};
    static std::uint8_t c94[32] = {0xaa,0xd7,0xc0,0x32,0x93,0xe1,0x7c,0x9f,0x9b,0xa6,0xb2,0x4c,0xcc,0x8c,0xe1,0x73,0x98,0x4d,0x18,0x31,0xb7,0xbb,0xeb,0x1f,0x15,0x35,0x21,0x26,0x27,0x66,0x71,0x24};
    sm2_fp_from_bytes(a, a94);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a95[32] = {0x56,0xee,0xf6,0x1f,0xe3,0xed,0xa1,0x2f,0xdc,0xa2,0x88,0x4d,0x57,0x44,0xc2,0x0a,0x5b,0xbf,0x99,0x86,0x7e,0xd1,0x9e,0x68,0x37,0xc6,0x5e,0xa5,0x79,0x86,0xf3,0xa8};
    static std::uint8_t c95[32] = {0xa9,0x11,0x09,0xdf,0x1c,0x12,0x5e,0xd0,0x23,0x5d,0x77,0xb2,0xa8,0xbb,0x3d,0xf5,0xa4,0x40,0x66,0x78,0x81,0x2e,0x61,0x98,0xc8,0x39,0xa1,0x5a,0x86,0x79,0x0c,0x57};
    sm2_fp_from_bytes(a, a95);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a96[32] = {0x72,0xf1,0x4f,0xd3,0x7f,0x16,0x9f,0x42,0x20,0x55,0x09,0x26,0xd5,0x84,0xd6,0x66,0xe6,0xd7,0x11,0xab,0xff,0xa1,0xd4,0xfa,0x26,0xe7,0xd6,0xbf,0x4b,0xe1,0xae,0xd6};
    static std::uint8_t c96[32] = {0x8d,0x0e,0xb0,0x2b,0x80,0xe9,0x60,0xbd,0xdf,0xaa,0xf6,0xd9,0x2a,0x7b,0x29,0x99,0x19,0x28,0xee,0x53,0x00,0x5e,0x2b,0x06,0xd9,0x18,0x29,0x40,0xb4,0x1e,0x51,0x29};
    sm2_fp_from_bytes(a, a96);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a97[32] = {0x6b,0xab,0x31,0xc2,0xcb,0xbd,0x3d,0x26,0x27,0x0f,0x80,0xd0,0x14,0x91,0x19,0xe4,0x78,0xd8,0xa5,0xc1,0xa0,0xcd,0xa2,0x11,0x8d,0x50,0x43,0x6e,0x0b,0x10,0xa8,0x8b};
    static std::uint8_t c97[32] = {0x94,0x54,0xce,0x3c,0x34,0x42,0xc2,0xd9,0xd8,0xf0,0x7f,0x2f,0xeb,0x6e,0xe6,0x1b,0x87,0x27,0x5a,0x3d,0x5f,0x32,0x5d,0xef,0x72,0xaf,0xbc,0x91,0xf4,0xef,0x57,0x74};
    sm2_fp_from_bytes(a, a97);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a98[32] = {0xfd,0xff,0x01,0x2d,0x43,0x25,0x8e,0x93,0x7b,0xe6,0x56,0xcc,0x54,0x9f,0x50,0x52,0x2a,0x88,0x10,0x91,0xd1,0x45,0x51,0x02,0x40,0x86,0xa2,0x7f,0x09,0x5f,0xe0,0x11};
    static std::uint8_t c98[32] = {0x02,0x00,0xfe,0xd1,0xbc,0xda,0x71,0x6c,0x84,0x19,0xa9,0x33,0xab,0x60,0xaf,0xad,0xd5,0x77,0xef,0x6d,0x2e,0xba,0xae,0xfe,0xbf,0x79,0x5d,0x80,0xf6,0xa0,0x1f,0xee};
    sm2_fp_from_bytes(a, a98);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }

    static std::uint8_t a99[32] = {0xfc,0x26,0x8a,0x77,0x9c,0x27,0x8f,0xef,0x4b,0x06,0x8f,0xc8,0xc9,0xa7,0x36,0x10,0x56,0xaa,0x4e,0x61,0x21,0xe9,0x66,0xae,0xbf,0x21,0xe0,0x1b,0x77,0x3c,0x02,0xf1};
    static std::uint8_t c99[32] = {0x03,0xd9,0x75,0x87,0x63,0xd8,0x70,0x10,0xb4,0xf9,0x70,0x37,0x36,0x58,0xc9,0xef,0xa9,0x55,0xb1,0x9d,0xde,0x16,0x99,0x52,0x40,0xde,0x1f,0xe4,0x88,0xc3,0xfd,0x0e};
    sm2_fp_from_bytes(a, a99);
    sm2_fp_neg(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_neg");
    }
}